package com.visitor.demo2.impl;

import com.visitor.demo2.GraphicVisitor;
import com.visitor.demo2.MyGraphic;

//MyRegularTriangle.java 正三角形类
public class MyRegularTriangle extends MyGraphic
{
    public float sidelength;

    public MyRegularTriangle()
    {
        super();
        sidelength = 1;
    }

    public MyRegularTriangle(float centerPointX, float centerPointY, float sidelength, float angle)
    {
        super("RegularTriangle", centerPointX, centerPointY, angle);
        this.sidelength = sidelength;
    }

    public void accept(GraphicVisitor v)
    {
        v.visit(this);
    }
}